package com.chance.cc.crawler.development.command.meta.font;

import com.chance.cc.crawler.core.downloader.HttpConfig;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.core.downloader.HttpRequest;

import java.util.Arrays;
import java.util.List;

/**
 * @author bx
 * @date 2020/12/10 0010 15:05
 */
public class TTFontTest {

    public static void main(String[] args) {
        CrawlerFontCommand fontCommand = new CrawlerFontCommand("192.168.1.215", 9599);

        String domain = "autohome";

        HttpRequest httpRequest = new HttpRequest();
        httpRequest.setUrl("https://k3.autoimg.cn/g1/M0B/D2/95/wKgHGFsUz2GAF_fsAABj7DNgsNo04..ttf");

        HttpConfig httpConfig = HttpConfig.me(domain);

        List<String> needParseList = Arrays.asList("edbc","eca7","ec8d","ed50");

        HttpPage httpPage = fontCommand.parseTTFont(httpRequest, httpConfig, needParseList, null);
        System.out.println(httpPage.getRawText());
    }
}
